// A-S-M team
// Project: BattleCity
// Created: 23.03.2011
// Last change: 23.03.2011
// Description: class "Resources" - singleton for operating with all game resources

#pragma once
#include <ClanLib/core.h>

using namespace std;

class Resources
{

// sigleton pattern implementation
public:
	static Resources * getInstance()
	{
		if (!p_instance)
			p_instance = new Resources();
		return p_instance;
	}

private:
	Resources() {}
    Resources(const Resources&);  
    Resources& operator=(Resources&);
	static Resources * p_instance;

// class itself
public:
	// must be called before first use
	void init(CL_String res_file_name) { 
		_resources.load(res_file_name);
	}	
	
	CL_ResourceManager getManager(){
		return _resources;
	}

private:
	CL_ResourceManager _resources;
};